//
//  JFBStaffDS.h
//  ios-supplier
//
//  Created by feynmanyuan on 15/4/17.
//  Copyright (c) 2015年 feynmanyuan. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface JFBStaffDS : NSObject
//配送员ID
@property (nonatomic, assign) NSUInteger Id;
// 是否默认配送员 “1”：是，”0”：否
@property (nonatomic, assign) NSUInteger isDefault;
// 配送员姓名
@property (nonatomic, strong) NSString *name;
// 配送员手机
@property (nonatomic, strong) NSString *telephone;
// 配送员状态 “1”：是，”0”：否
@property (nonatomic, strong) NSString  *isAvailable;
//配送员与商家关联关系ID
@property(nonatomic, assign) NSUInteger merchantDeliverId;

- (instancetype)initWithAttributes:(NSDictionary *)attributes;
+ (NSURLSessionDataTask *)loadStaffList:(void (^)(NSArray *staffList, NSError *error))block pager:(JFBPager*)pager;
+ (NSURLSessionDataTask *)deleteStaff:(void (^)(BOOL isSuccess, NSError *error))block staffID:(NSUInteger)staffID;

+ (NSURLSessionDataTask *)addStaff:(void (^)(BOOL isSuccess, NSString *message, NSError *error))block staff:(JFBStaffDS*)staff;

+ (NSURLSessionDataTask *)updateStaff:(void (^)(BOOL isSuccess, NSString *message, NSError *error))block staff:(JFBStaffDS*)staff;

+(void)getDefaultStaff:(void (^)(JFBStaffDS *staff, NSError *error))block;
+(JFBStaffDS*)loadFromDB;
@end
